<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo $this->lang?>" xml:lang="<?php echo $this->lang?>">
<head>
	<?php 
	$this->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8');
	$this->headMeta()->appendHttpEquiv('Content-Language', $this->lang);
	
	$this->headTitle()->append( $this->system );
	$this->headTitle()->setSeparator(' - ');
	
	?>
	<?php echo $this->headTitle();?>
	<?php echo $this->headMeta();?>
	
	
	<link rel="icon" href="<?php echo $this->baseUrl('img/favicon.ico')?>" type="image/x-icon" />
	<link rel="shortcut icon" href="<?php echo $this->baseUrl('img/favicon.ico')?>" type="image/x-icon" />
	
	<link rel="stylesheet" href="<?php echo $this->compress()->css()?>" type="text/css" />    
	
</head>
<body>
<div id="wrapper">
	<?php echo $this->render('header.phtml');?>
	<!-- content -->
	<div id="content">
		<?php 
		$mainRight = isset( $this->mainRight ) ? true : false ; 
		?>
	
	
	
		<div id="main" class="<?php echo isset( $this->mainRight ) ? 'mainRight' : 'mainLeft'?>">
			<?php echo $this->layout()->content ?>
		</div>
		<!-- sidebar -->
        <div id="<?php echo isset( $this->mainRight ) ? 'sideLeft' : 'sideRight'?>">
        	<?php echo $this->placeholder('side') ?>			
		</div>
		<div class="clear"></div>
	</div>
	<!-- end content -->	
	
<!--end wrapper-->
</div>
<div id="wrapperFooter">
	<div id="copyright">&copy;<?php echo date('Y')?> <?php echo $this->translate('copyright')?></div>
	<?php echo $this->render('footer.phtml');?>
</div>
<?php 
if ( ! isset($this->cliente)){
    echo $this->render('login.phtml');
}

$this->render('analytics.phtml');
?>

<div id="map"></div>
<div id="fb-root"></div> 
<script type="text/javascript" src="<?php echo $this->compress()->js()?>"></script> 

<?php 
$this->jQuery()->onLoadCaptureStart();
?>
	$apiKey = "<?php echo $this->googleMapsKey?>";
	bindInputsFocus();
	bindMiCuenta();
<?php
$this->jQuery()->onLoadCaptureEnd();
        
    echo $this->inlineScript();        
        
	echo $this->jQuery()->setRenderMode( ZendX_JQuery::RENDER_SOURCES );
	echo $this->jQuery()->setRenderMode( ZendX_JQuery::RENDER_JAVASCRIPT );
	echo $this->jQuery()->setRenderMode( ZendX_JQuery::RENDER_JQUERY_ON_LOAD );
	?>
<script type="text/javascript">            
	var scriptTag = '<' + 'script src="http://maps.google.com/maps/api/js?sensor=false">' + '<' + '/script>';            
	document.write(scriptTag);    
</script> 
</body>   
</html>